package org.elsfs.cloud.common.mybatis.ext.sql.support.condition;


import lombok.RequiredArgsConstructor;

/**
 * And条件
 *
 */
@RequiredArgsConstructor
public class AndConditionItem implements ConditionItem {

    /**
     * 条件项
     */
    private final ConditionItem conditionItem;

    /**
     * 构建SQL片段
     *
     * @return SQL片段
     */
    @Override
    public String buildSqlFragment() {
        return String.format(
            "AND %s",
            this.conditionItem.buildSqlFragment()
        );
    }
}
